# $Id$
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Ben <ben@benmazer.net>

pkgname=gtkglext
pkgver=1.2.0
pkgrel=11
pkgdesc="opengl extensions for gtk2"
arch=('x86_64')
url="http://gtkglext.sourceforge.net/"
license=('LGPL')
depends=('gtk2' 'glu' 'libxmu' 'pangox-compat')
makedepends=('python')
source=("http://downloads.sourceforge.net/sourceforge/gtkglext/${pkgname}-${pkgver}.tar.bz2"
	'gtk2.20.patch' gtkglext-gcc8.patch)
md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4'
         'e5a87ec3f2d0e616c6f32f90c3f7237f'
         '9f116d557167dabf4fcbe765f5c784b2')

prepare() {
  cd $pkgname-$pkgver

  patch -Np1 -i "${srcdir}/gtk2.20.patch"
  sed '/AC_PATH_XTRA/d' -i configure.in  
  patch -p1 -i ../gtkglext-gcc8.patch # Fix build with GCC 8

  autoreconf -vi
}
  
build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr \
              --disable-static
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
